<template>
  <van-nav-bar
    id="navbar"
    :title="navinfo.title"
    :left-text="navinfo.leftText"
    :right-text="navinfo.rightText"
    :left-arrow="navinfo.leftText!=''"
    @click-left="onClickLeft"
    @click-right="onClickRight"
  >
  </van-nav-bar>
</template>
<script>

export default {
  data() {
    return {
    }
  },
  props:['navinfo'],
  methods:{
    onClickLeft() {
        this.$router.go(-1);
    },
    onClickRight() {
      this.$emit(this.navinfo.rightLink);
    }
  },
  beforeCreate: function() {
  },
  created: function() {
  },
  beforeMount: function() {
  },
  mounted: function() {
  },
  beforeUpdate: function() {
  },
  updated: function() {
  },
  activated: function() {
  },
  deactivated: function() {
  },
  beforeDestroy: function() {
  },
  destroyed: function() {
  },
  errorCaptured: function(err, vm, info) {
  }
}
</script>
<style scoped>
</style>
